// app.js
App({
  onLaunch() {
    // 展示本地存储能力
    const logs = wx.getStorageSync('logs') || []
    logs.unshift(Date.now())
    wx.setStorageSync('logs', logs)

    // 判断登录
    if (!wx.getStorageSync('token')) {
      wx.redirectTo({
        url: '/pages/login/login'
      })
    }else {
      console.log('已登录');
    }
  },
  globalData: {
    userInfo: null
  }
})
